﻿using System.Reflection;

namespace Collections;

public class StackItem
{
    public void MyStack()
    {
        Stack<int> stk = new Stack<int>();
        stk.Push(1);
        stk.Push(2);
        stk.Push(3);
        stk.Push(4);

        stk.Pop();

        foreach (var item in stk)
        {
            Console.WriteLine(item);
        }

    }
}